using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;

namespace Legend.Web.QueryString
{
    /// <summary>
    /// Represents an exception while parsing a query string into a QueryString object.
    /// </summary>
    [Serializable]
    public class QueryStringParseException
        : Exception 
    {
        /// <summary>
        /// Creates a new instance.
        /// </summary>
        /// <param name="message">A message for the exception.</param>
        /// <param name="innerException">An exception that caused this exception to be thrown.</param>
        public QueryStringParseException(string message, Exception innerException)
            : base(message, innerException)
        { 

        }

        /// <summary>
        /// Creates a new instance.
        /// </summary>
        public QueryStringParseException()
            : this (null, null)
        { }

        /// <summary>
        /// Creates a new instance.
        /// </summary>
        /// <param name="message">A message for the exception.</param>
        public QueryStringParseException(string message)
            : this(message, null)
        { }

        /// <summary>
        /// Used for deserialization.
        /// </summary>
        protected QueryStringParseException(SerializationInfo info,
            StreamingContext context)
            : base(info, context)
        { }
    }
}
